#include <51func.h>
int main(int argc, char *argv[])
{
    // ./7_writeblock_write 1.pipe
    ARGS_CHECK(argc,2);
    int fdw = open(argv[1],O_WRONLY);
    char buf[4096] = {0};
    int total = 0;
    while(1){
        ssize_t sret = write(fdw,buf,sizeof(buf));
        total += sret;
        printf("total = %d\n", total);
    }
    return 0;
}

